<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>新增表单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--
      <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"  href="../static/css/bootstrap.min.css" type="text/css">
   -->

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

</head>
<body>
<div class="container" style="max-width: 700px">
    <h2 class="page-link">新增表单</h2>
    <form action="#" th:action="@{/books/input}" th:object="${book}" method="post"
          style="background-color: rgba(237,210,245,0.09)">
        <input type="hidden" th:value="*{id}" name="id">
        <div class="form-group ">
            <label for="nameId">书名</label>
            <input type="text" name="name" id="nameId" class="form-group" size="60" th:field="*{name}">
        </div>
        <div class="form-group ">
            <label for="authorId">作者</label>
            <input type="text" name="author" id="authorId" class="form-group" size="60" th:field="*{author}">
        </div>

        <div class="form-group">
            <label for="descriptionId">说明</label>
            <input type="text" name="description" id="descriptionId" class="form-group" size="60"
                   th:field="*{description}">
        </div>
        <div class="form-group">
            <label for="statusId">状态</label>
            <select name="status" id="statusId">
                <option value="0" th:selected="(*{status}=='0')">想读</option>
                <option value="1" th:selected="(*{status}=='1')">在读</option>
                <option value="2" th:selected="(*{status}=='2')">已读</option>
            </select>
        </div>

        <p class="text-center">
            <button type="submit" class="btn btn-primary">提交</button>
        </p>
    </form>

</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
<script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js" type="text/javascript"></script>

</body>
</html>